CUBE CONNECT Edition Help

Creating table views

The Query Definition tool in Table Editor lets you create different table views to select records, fields, join and merge tables, etc.

1. Click Toolbar > Query Definition

You can enter any type of supported SELECT statement in the query definition box.

Below are some forms of SELECT statements which can used in the query definition box:

  • Display only certain columns by editing the default SELECT statement to:
    SELECT column_name FROM table_name. 
  • Extract records that fulfill a condition by using the WHERE clause after the SELECT statement:
    SELECT column1, column2, ...
    FROM table_name
    WHERE condition;
    The following operators can be used to set the conditions(s): =,IS,>,>=,<,<=,<>,!=, IS NOT, among others.
  • Combine rows from multiple tables based on a related column using the JOIN clause:
    SELECT column_name(s)
    FROM table1
    (INNER JOIN/ LEFT JOIN) table2
    ON table1.column_name = table2.column_name;
    • INNER JOIN: selects records that have matching values in the tables to join.
    • LEFT JOIN: returns records from left table and the matching records from the other table.
  • Display the number, average or sum of records that match a condition:
    SELECT COUNT/AVG/SUM(column_name)
    FROM table_name
    WHERE condition;
  • Combine the set of multiple SELECT statements using the UNION operator
    SELECT column_name(s) FROM table1
    UNION
    SELECT column_name(s) FROM table2;
Note: The UNION operator requires that all SELECT statements have the same number of columns, same data type, and are in the same order.

2. Click Apply

  • Whenever you apply a condition the status bar on the bottom right will show if the filtering process is still in progress.

3. To clear the condition box, click on the drop-down next to Apply and select Reset

Note: There are other additional operators/ clauses/ keywords that can be applied using the query definition tool like GROUP BY, MIN and MAX, SELECT TOP, LIKE, BETWEEN, NULL, among others.